package com.dmlll.service.impl;

import com.dmlll.dao.SpouseMapper;
import com.dmlll.pojo.Spouse;
import com.dmlll.service.SpouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class SpouseServiceImpl implements SpouseService {
    @Autowired
    private SpouseMapper spouseMapper;

    @Override
    public int inserts(Spouse spouses){
        return spouseMapper.insert(spouses);
    }

    @Override
    public Spouse findSpouseById(Integer id) {
        return spouseMapper.selectByPrimaryKey(id);
    }

    @Override
    public void updateSpouse(Spouse spouse) {
        spouseMapper.updateByPrimaryKeySelective(spouse);
    }
}
